import React, { useEffect } from 'react'
import { View, Text } from '@tarojs/components'
import { useDispatch } from 'react-redux'
import { loadDataAsync } from '../../../actions/list'

import Swiper from './swiper'
import Search from '../../../components/search/search'
import HotCate from './hotcate'
import Top10 from './top10'

export default function index() {
  const dispatch = useDispatch()

  useEffect(() => {
    dispatch(loadDataAsync())
  }, [])

  return (
    <View>
      <Swiper></Swiper>
      <Search
        outerBg="#eee"
        innerBg="#fff"
      ></Search>
      <HotCate></HotCate>
      <Top10></Top10>
    </View>
  )
}